#include<iostream>
using namespace std;
int f[1010];
int main()
{
	int n;
	cin >> n;
	f[0] = 1;
	f[1] = 1;
	f[2] = 2;
	for (int i = 3; i <= n; i++) {
		if (i % 2 == 1) {
			f[i] = f[i - 1];
		}
		else {
			f[i] = f[i - 1] + f[i / 2];
		}
	}
	cout << f[n] << endl;
	return 0;
}